Slicing wxHaskell modules to derive the User Interface Abstract Model
نویسندگان
چکیده
In this paper, we discuss an experience slicing an Haskell program to separate its GUI developed with the graphic toolkit wxHaskell. The slicing operation was implemented in Strafunski, an Haskell-centered software bundle for generic programming and language processing. To analyze the user interface and extract the abstract model, we first parse the source Haskell program, and build its Abstract Syntax Tree (AST). Then a strategic traversal of the AST is used to slice the GUI wxHaskell code, and build the graph of dependencies between widgets. In this way it becomes possible to understand the execution flow of the program. Reusing and modifying legacy systems are complex and expensive tasks, because the required program comprehension is a difficult and time-consuming process. Thus, the need for methods and tools that facilitate program comprehension is urgent and strong. Reverse engineering aims at analyzing the software in order to represent it in an abstract format that makes easier to understand what it does and how it works. Reverse engineering tools provide means to support this task. Nowadays those software systems offer a rich interaction with the user, and their architectures are oriented towards a layered organization, separating at least the interface layer from the business core and data persistence modules. In this context—system maintenance and comprehension of software with graphical user interfaces—we present the results of a research work on the application of strategic programming and slicing techniques to the reverse engineering of interactive functional applications. Holmes, the tool so far developed and described in the paper, is capable of deriving the user interface abstract model for interactive functional programs. Since wxHaskell became the most famous graphic toolkit to build Graphical User Interfaces (GUI) for Haskell, we have investigated slicing techniques specialized for wxHaskell modules. In order to extract the user interface model from a Haskell/wxHaskell program we need to isolate the subset of functions responsible for the interaction. Slicing techniques are appropriate for that task. To build Holmes it is necessary to construct a slicing function [1, 2] that isolates the wxHaskell subprogram from the entire Haskell program. At a first glance, the obvious and easiest way is to define a recursive function to traverse the Abstract Syntax Tree (AST) of the program and return the wxHaskell subtree (maybe a forest). However, that approach forces the programmer to have full knowledge of Haskell grammar, and to write a complex and long set of mutually recursive
منابع مشابه
Automatic Graphical User Interface Form Generation Using Template Haskell
This paper presents AutoGUI, a Template Haskell library for automatic form generation. A form is a part of graphical user interface (GUI) restricted to displaying a value and allowing the user to modify it and then either accept changes or abandon them. The library is built on top of medium-level GUI library wxHaskell. The Template Haskell and Haskell type system allow the forms to be built ful...
متن کاملA Functional Programming Technique for Forms in Graphical User Interfaces
This paper presents FunctionalForms, a combinator library for constructing fully functioning forms in a concise and flexible way. A form is a part of a graphical user interface (GUI) restricted to displaying a value and allowing the user to modify it. The library is built on top of the medium-level GUI library wxHaskell. To obtain complete separation between the structure of a form’s layout and...
متن کاملUsing the Bandera Tool Set to Model - checkProperties of Concurrent Java
The Bandera Tool Set is an integrated collection of program analysis, transformation, and visualization components designed to facilitate experimentation with model-checking Java source code. Bandera takes as input Java source code and a software requirement formalized in Bandera's temporal speciication language, and it generates a program model and speciication in the input language of one of ...
متن کاملAnalysis of User Interface Environment in Scientific Databases According to the Viewpoints of Postgraduate Students Applying Dervin's Sense-Making Theory
Abstract Background and purpose: The purpose of this study was to analyze the user interface environment of some databases (Science Direct, Springer, Clinical Key, and Wiley online library) from the perspective of users applying Dervin's sense-making theory. Materials and methods: A cross-sectional descriptive study was conducted in 100 PhD students and research-based PhD students in Mazandar...
متن کاملA New Single-Display Intelligent Adaptive Interface for Controlling a Group of UAVs
The increasing use of unmanned aerial vehicles (UAVs) or drones in different civil and military operations has attracted attention of many researchers and science communities. One of the most notable challenges in this field is supervising and controlling a group or a team of UAVs by a single user. Thereupon, we proposed a new intelligent adaptive interface (IAI) to overcome to this challenge. ...
متن کامل